#!/bin/sh
#PBS -q mpi
#PBS -l nodes=2:ppn=16
#PBS -l walltime=00:01:00
#PBS -l vmem=1GB

# change to job submit directory
cd $PBS_O_WORKDIR

# Usually do it this way: determine number of MPI processes we have from the machinefile
#NNODES=`cat $PBS_NODEFILE | wc -l`

# In our assignment we should use exactly 17 processors (but have 32). Therefore:
# !!! Change to number of processes you want to use.
# !!! This value must always be smaller than the product of the two values nodes and ppn from the second line of the script
NNODES=32

# start here your MPI program (example here: mpi.exe)
mpirun -np $NNODES -machinefile $PBS_NODEFILE ./ring_one.exe
#mpirun -np $NNODES -machinefile $PBS NODEFILE ./ring_two.exe

exit
